import { Menu } from '../entities/menu.entity';
import { Allow, IsInt, IsString } from 'class-validator';
import { CommonColumnEntity } from '../../../../util/entity/common.column.entity';

export class CreateMenuDto extends CommonColumnEntity {
  @IsString()
  name: string;

  @IsInt()
  type: number;

  @Allow()
  path?: string;

  @Allow()
  component?: string;

  @Allow()
  perm?: string;

  @Allow()
  sort?: number;

  @Allow()
  icon?: string;

  @Allow()
  redirect?: string;

  @Allow()
  parent?: Menu;
}
